package cn.wolfcode.mapper;

import cn.wolfcode.domain.Announcement;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AnnouncementMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Announcement record);

    Announcement selectByPrimaryKey(Long id);

    List<Announcement> selectAll();

    int updateByPrimaryKey(Announcement record);

    List<Announcement> selectForList(QueryObject qo);

    void changeStatus(@Param("eId") Long eId, @Param("aId") Long aId);

    Announcement getOneById(Long aId);

    boolean getStatus(@Param("eId") Long eId, @Param("aId") Long aId);

    void changeIStatus(@Param("id") Long id, @Param("status") boolean status);

    List<Announcement> selectNoRead(Long id);

    int getCount(Long id);
}